#!/usr/bin/perl
use strict;
use warnings;

my %id;

my $file= $ENV{data_path} . "/sql/enst_refseq_82_38.txt";
print "$file ";

open FILE, $file;

while(<FILE>) {
	chomp;
	my @enst_refseq = split /\t/, $_;
	$id{$enst_refseq[0]}=$enst_refseq[2];
}

# my @enst=keys %id;

close FILE;

open FILE, "$ARGV[0]";

while (<FILE>) {
	chomp;
	if (/^ENST/) {
		if ($id{$_}) {
			print "$_\t$id{$_}\n";
		}else {
			print "$_\t\n";
		}
	}else {
		print "\t\n";
	}
}